#ifndef MATRIX4X4_H
#define MATRIX4X4_H

#include "Vector3D.h"

namespace RayTracer
{
    class Matrix4x4
    {
    private:
	float values[4][4];

    public:
	Matrix4x4();
	Matrix4x4(float row1[], float row2[], float row3[], float row4[]);
	
	float Get11() const;
	float Get12() const;
	float Get13() const;
	float Get14() const;
	float Get21() const;
	float Get22() const;
	float Get23() const;
	float Get24() const;
	float Get31() const;
	float Get32() const;
	float Get33() const;
	float Get34() const;
	float Get41() const;
	float Get42() const;
	float Get43() const;
	float Get44() const;

	Vector3D GetColumn(int index) const;
	Vector3D GetRow(int index) const;

	static Matrix4x4 CreateRotationMatrix(float xAngle, float yAngle, float zAngle);
	static Matrix4x4 CreateXAxisRotationMatrix(float anagle);
	static Matrix4x4 CreateYAxisRotationMatrix(float anagle);
	static Matrix4x4 CreateZAxisRotationMatrix(float anagle);
	static Matrix4x4 CreateTranslationMatrix(float dx, float dy, float dz);
	//static Matrix4x4 CreateShearMatrix(float angle);

	static Vector3D Mul(const Matrix4x4 *m, const Vector3D *v);
	static Matrix4x4 Mul(const Matrix4x4 *m1, const Matrix4x4 *m2);

	float Determinant() const;
    };
};

#endif
